<template>
  <div class="VmodelVuexState">
    <input type="text" v-model="message" />
    <span>{{ message }}</span>
  </div>
</template>

<script>
export default {
  computed: {
    message: {
      get() {
        return this.$store.getters.GET_MESSAGE
      },
      set(val) {
        this.$store.commit('SET_MESSAGE', val)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.VmodelVuexState {
  input {
    margin-right: 10px;
    border: solid 1px #ddd;
    padding: 6px;
    outline: none;
  }
}
</style>